<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <h2>Edital</h2>
            <h:form id="form" acceptcharset="utf-8">
                <p:growl id="msg" life="3000" />
                <table style="min-height:500px; width: 100%">
                    <tr>
                        <td style="width: 200px; vertical-align:top;">
                            <p:menu style="width:200px;" >  
                                
                                <p:submenu label="Emitir Edital">  
                                    <p:menuitem value="Data" style="font-size: 13px;" actionListener="#{managerRedirect.redirect('viewEdictDate.xhtml')}" 
                                                update="@form"  icon="ui-icon-calculator" />  
                                   <p:menuitem value="Cartório" style="font-size: 13px;" actionListener="#{managerRedirect.redirect('viewEdictNotary.xhtml')}" 
                                                update="@form"  icon="ui-icon-home" /> 
                                </p:submenu>
                              
                                
                            </p:menu>

                        </td>
                        <td style="vertical-align:top;">
                            <p:fieldset style="border: 0px;">
                                <fieldset style="border: 1px solid #E3E3E3">
                                    <legend>
                                        Próximas Correições
                                    </legend>
                                    <p:dataTable value="#{managerSearcheQuestionnaireResponse.lstQuestionnaireResponseNext()}"
                                                 var="q"  paginator="true" rows="5" style="width: 100%" 
                                                 paginatorPosition="bottom"
                                                 emptyMessage="Nenhuma Correição encontrada"
                                                 paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"  
                                                 rowsPerPageTemplate="5,10,15"
                                                 >
                                        <f:facet name="header">
                                            Próximas Correições 
                                            
                                        </f:facet>  
                                        
                                        <p:column headerText="Nome" style="width: 200px;">
                                            <p:outputLabel value="#{q.name}"/>
                                        </p:column>
                                        
                                        <p:column headerText="Executor" style="width: 200px;">
                                            <p:outputLabel value="#{q.executor.name}"/>
                                        </p:column>
                                        <p:column headerText="Cartório" style="width: 180px;">
                                            <p:outputLabel value="#{q.notaryOffice.nome}"/>
                                        </p:column>
                                        <p:column headerText="Data Q" style="200px;">
                                            <h:outputText value="#{q.dateQ}">
                                                <f:convertDateTime pattern="dd/MM/yyyy"/>
                                               
                                            </h:outputText>
                                            
                                            
                                        </p:column>
                                        
                                        <p:column headerText="Opções" style="font-size: 12px;">
                                            <p:commandButton icon="ui-icon-print" title="Visualizar Edital"
                                                             ajax="false" actionListener="#{managerRelEdit.generetorReportPdf(q)}" update="@form"/>
                                            <!--<p:commandButton icon="ui-icon-play" title="Dados da Correição" actionListener="{managerEditQuestionnaireResponse.viewIssues(q)}" update="@form"/>-->
                                        </p:column>
                                    </p:dataTable>    
                                </fieldset>
                            </p:fieldset>

                        </td>
                    </tr>
                </table>
            </h:form>
        </ui:define>
    </ui:composition>

</html>



